package org.summer.lawyer.util;

import cn.hutool.core.util.StrUtil;

import java.util.Map;

/**
 *
 */
public class ParamsUtil {

    /**
     * 日期时间转换
     * beginTime => 2024-01-01 00:00:00
     * endTime   => 2024-01-01 23:59:59
     */
    public static Map<String, Object> getParams(Map<String, Object> params) {
        if(params.get("beginTime") != null && params.get("endTime") != null) {
            params.put("beginTime", StrUtil.format("{} 00:00:00", params.get("beginTime")));
            params.put("endTime", StrUtil.format("{} 23:59:59", params.get("endTime")));
        }
        return params;
    }
}
